
local UIDirectionControl = class("UIDirectionControl", require("unity.LuaMonoBehaviour"))

---
---mUseRelativeRotation boolean
---
function UIDirectionControl:Awake()
    self.mRelativeRotation = nil
end

function UIDirectionControl:Start()
    self.mRelativeRotation = self.transform.parent.localRotation
end

function UIDirectionControl:Update()
    if self.mUseRelativeRotation then
        self.transform.rotation = self.mRelativeRotation
    end
end

return UIDirectionControl
